package com.atguigu.ggkt.vod.config.excel;

import com.alibaba.excel.EasyExcel;

import java.util.ArrayList;
import java.util.List;

public class testWrite {
    public static void main(String[] args) {
        String fileName = "D:\\write.xlsx";
        EasyExcel.write(fileName,Stu.class)
                .sheet("写入方法")
                .doWrite(data());
    }

    private static List<Stu> data() {
        List<Stu> list = new ArrayList<>();
        for (int i = 0; i < 100; i++) {
            Stu stu = new Stu();
            stu.setSname("吴伟"+i);
            stu.setSno(i);
            list.add(stu);
        }
        return list;
    }
}
